import request from '@/utils/request'

const api_name = '/eduservice/collect'
export default {
  //添加收藏
  addCollect(courseId) {
    return request({
      url: `${api_name}/add/${courseId}`,
      method: 'get',
    })
  },
  // 删除收藏
  deleteCollect(courseId) {
    return request({
      url: `${api_name}/deleteCollect/${courseId}`,
      method: 'delete',
    })
  },
  // 是否被收藏
  isCollect(courseId) {
    return request({
      url: `${api_name}/isCollect/${courseId}`,
      method: 'get',
    })
  },
}
